// 登录页面样式 - 现代化设计
.loginContainer {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;

  // 背景装饰
  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
  }

  @keyframes float {
    0%, 100% {
      transform: translateY(0px) rotate(0deg);
    }
    50% {
      transform: translateY(-20px) rotate(180deg);
    }
  }
}

.loginCard {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.3);
  }

  :global(.ant-card-body) {
    padding: 40px 32px;
  }
}

.header {
  text-align: center;
  margin-bottom: 32px;

  .logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
  }

  .title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .subtitle {
    font-size: 16px;
    color: #718096;
    font-weight: 400;
  }
}

.tabContainer {
  margin-bottom: 24px;
  background: #f7fafc;
  border-radius: 12px;
  padding: 4px;
  display: flex;
  position: relative;

  .tabButton {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;

    &.active {
      color: #667eea;
      background: white;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    &:hover:not(.active) {
      color: #4a5568;
    }
  }
}

.formContainer {
  .formItem {
    margin-bottom: 20px;

    :global(.ant-form-item-label) {
      padding-bottom: 4px;

      label {
        font-size: 14px;
        font-weight: 500;
        color: #4a5568;
      }
    }

    :global(.ant-input) {
      height: 48px;
      border-radius: 12px;
      border: 2px solid #e2e8f0;
      font-size: 16px;
      padding: 0 16px;
      transition: all 0.3s ease;

      &:hover {
        border-color: #cbd5e0;
      }

      &:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
      }

      &::placeholder {
        color: #a0aec0;
      }
    }

    :global(.ant-input-password) {
      height: 48px;
      border-radius: 12px;
      border: 2px solid #e2e8f0;
      transition: all 0.3s ease;

      &:hover {
        border-color: #cbd5e0;
      }

      &:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
      }

      input {
        font-size: 16px;
        padding: 0 16px;

        &::placeholder {
          color: #a0aec0;
        }
      }
    }

    :global(.ant-input-prefix) {
      margin-right: 12px;
      color: #a0aec0;
      font-size: 16px;
    }
  }

  .submitButton {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    }

    &:active {
      transform: translateY(0);
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }
}

.divider {
  margin: 24px 0;
  
  :global(.ant-divider-inner-text) {
    color: #a0aec0;
    font-size: 14px;
  }
}

.footer {
  text-align: center;
  padding-top: 16px;

  .homeLink {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 12px;

    &:hover {
      background: rgba(102, 126, 234, 0.1);
      color: #5a67d8;
    }
  }

  .terms {
    font-size: 12px;
    color: #a0aec0;
    line-height: 1.5;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .loginContainer {
    padding: 16px;
  }

  .loginCard {
    max-width: 100%;
    border-radius: 16px;

    :global(.ant-card-body) {
      padding: 32px 24px;
    }
  }

  .header {
    .logo {
      width: 56px;
      height: 56px;
      font-size: 24px;
    }

    .title {
      font-size: 24px;
    }

    .subtitle {
      font-size: 14px;
    }
  }

  .formContainer {
    .formItem {
      :global(.ant-input),
      :global(.ant-input-password) {
        height: 44px;
        font-size: 16px;
      }
    }

    .submitButton {
      height: 44px;
      font-size: 15px;
    }
  }
}

@media (max-width: 480px) {
  .loginCard {
    :global(.ant-card-body) {
      padding: 24px 20px;
    }
  }

  .header {
    margin-bottom: 24px;

    .logo {
      width: 48px;
      height: 48px;
      font-size: 20px;
    }

    .title {
      font-size: 22px;
    }
  }

  .tabContainer {
    .tabButton {
      padding: 10px 12px;
      font-size: 13px;
    }
  }
}

// 加载状态动画
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

// 错误状态样式
.error {
  :global(.ant-input),
  :global(.ant-input-password) {
    border-color: #e53e3e !important;
    
    &:focus,
    &:focus-within {
      box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
    }
  }
}

// 成功状态样式
.success {
  :global(.ant-input),
  :global(.ant-input-password) {
    border-color: #38a169 !important;
    
    &:focus,
    &:focus-within {
      box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1) !important;
    }
  }
}